#pragma once
#include "Socket.hpp"
#include <string>
#include <memory>

using namespace MySocket;

class Request
{
public:
    Request() {}
    Request(int x, int y, char oper) : _x(x), _y(y), _oper(oper)
    {
    }
    // 序列化
    std::string Serialize()
    {
    }
    // 反序列化
    bool DeSerialize(std::string &in)
    {
    }

    ~Request()
    {
    }

private:
    int _x;
    int _y;
    char _oper;
};

class Response
{
public:
    Response() {}
    Response(int result, int code)
        : _result(result), _code(code)
    {
    }
    std::string Serialize()
    {
    }
    bool DeSerialize(std::string &in)
    {
    }
    ~Response()
    {
    }

private:
    int _result;
    int _code;
};

class Potorol
{
public:
    Potorol() {}

    void GetRequest(std::shared_ptr<Socket> &sock, InetAddr &client)
    {
    }

    ~Potorol() {}

private:
    Request _req;
    Response _res;
};